package com.bjtraffic.gov.info.manager.controller;

import com.bjtraffic.gov.info.manager.service.SubwayService;

import java.util.Scanner;

public class SubwayController {
    Scanner sc = new Scanner(System.in);
    //1.创建地铁服务员对象
    SubwayService subSer = new SubwayService();

    public void addSubway() {

        System.out.println("请输入地铁站编号:");
        String num = sc.next();
        System.out.println("请输入地铁站名称:");
        String name = sc.next();
        System.out.println("请输入地铁站所属路线:");
        String line = sc.next();
        //指挥地铁站服务员对象调用它的添加方法,方法的参数接收用户输入的信息
        subSer.addSubway(num, name, line);
        //添加输出语句打印成功
        System.out.println("添加成功");
    }

    public void checkSubway() {
        //2.指挥地铁服务员对象调用他的查看地铁方法
        subSer.checkSubway();
    }
}
